// 自动生成模板AddressInfo
package autocode

import (
	"github.com/flipped-aurora/gin-vue-admin/server/global"
	"time"
)

// AddressInfo 结构体
// 如果含有time.Time 请自行import time包
type AddressInfo struct {
	global.GVA_MODEL
	UserGoodsId *int       `json:"userGoodsId" form:"userGoodsId" gorm:"column:user_goods_id;comment:对应奖品;size:19;"`
	UserId      *int       `json:"userId" form:"userId" gorm:"column:user_id;comment:用户id;size:19;"`
	Phone       string     `json:"phone" form:"phone" gorm:"column:phone;comment:收货人电话;size:255;"`
	Name        string     `json:"name" form:"name" gorm:"column:name;comment:收货人名称;size:255;"`
	AddressName string     `json:"addressName" form:"addressName" gorm:"column:address_name;comment:地址名称;size:255;"`
	GoodsId     *int       `json:"goodsId" form:"goodsId" gorm:"column:goods_id;comment:奖品id;size:19;"`
	Area        string     `json:"area" form:"area" gorm:"column:area;comment:区域信息;size:255;"`
	CreateTime  *time.Time `json:"createTime" form:"createTime" gorm:"column:create_time;comment:创建时间;"`
	GoodsName   string     `json:"goodsName" form:"goodsName" gorm:"column:goods_name;comment:奖品名称;size:40;"`
	UserName    string     `json:"userName" form:"userName" gorm:"column:user_name;comment:用户名字;size:50;"`
	OpenId      string     `json:"openId" form:"openId" gorm:"column:open_id;comment:用户openID;size:100;"`
	GoodsType   *int       `json:"goodsType" form:"goodsType" gorm:"column:goods_type;comment:奖品类型（1-兑换奖品；2-抽奖奖品）;size:10;"`
}

var Selects = "address_info.user_id, user_info.open_id, user_info.user_name, address_info.created_at, address_info.create_time, address_info.name, address_info.phone, address_info.address_name, address_info.area, goods_info.goods_name, goods_info.goods_type"

// TableName AddressInfo 表名
func (AddressInfo) TableName() string {
	return "address_info"
}
